package com.mhy.controller;


import com.mhy.dao1.BookDao;
import com.mhy.dao2.BookDao2;
import com.mhy.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by sang on 2018/7/17.
 */
@RestController
public class BookController {
    @Autowired
    BookDao bookDao;
    @Autowired
    BookDao2 bookDao2;
    @GetMapping("/test1")
    public void test1() {
        List<Book> books1 = bookDao.getAllBooks();
        List<Book> books2 = bookDao2.getAllBooks();
        System.out.println("books1:"+books1);
        System.out.println("books2:"+books2);
    }
}
